<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Direct3D 12 Memory Allocator: D3D12MA::POOL_DESC Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Direct3D 12 Memory Allocator
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a></li><li class="navelem"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">POOL_DESC</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">D3D12MA::POOL_DESC Struct Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_pool.html" title="Custom memory pool.">D3D12MA::Pool</a> object. To be used with <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515" title="Creates custom pool.">D3D12MA::Allocator::CreatePool</a>.  
 <a href="#details">More...</a></p>

<p><code>#include &lt;D3D12MemAlloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ac4ed93b0191344d68c0b4ac1a4822ff4" id="r_ac4ed93b0191344d68c0b4ac1a4822ff4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1">POOL_FLAGS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac4ed93b0191344d68c0b4ac1a4822ff4">Flags</a></td></tr>
<tr class="memdesc:ac4ed93b0191344d68c0b4ac1a4822ff4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags.  <br /></td></tr>
<tr class="separator:ac4ed93b0191344d68c0b4ac1a4822ff4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06e06813bcb5206e9f7a8b0564bf1d6a" id="r_a06e06813bcb5206e9f7a8b0564bf1d6a"><td class="memItemLeft" align="right" valign="top">D3D12_HEAP_PROPERTIES&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a06e06813bcb5206e9f7a8b0564bf1d6a">HeapProperties</a></td></tr>
<tr class="memdesc:a06e06813bcb5206e9f7a8b0564bf1d6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The parameters of memory heap where allocations of this pool should be placed.  <br /></td></tr>
<tr class="separator:a06e06813bcb5206e9f7a8b0564bf1d6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3795956e4fbfe7c3a23546e02e5d28dc" id="r_a3795956e4fbfe7c3a23546e02e5d28dc"><td class="memItemLeft" align="right" valign="top">D3D12_HEAP_FLAGS&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3795956e4fbfe7c3a23546e02e5d28dc">HeapFlags</a></td></tr>
<tr class="memdesc:a3795956e4fbfe7c3a23546e02e5d28dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Heap flags to be used when allocating heaps of this pool.  <br /></td></tr>
<tr class="separator:a3795956e4fbfe7c3a23546e02e5d28dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7284cc51a8ed5b551075584256de23c" id="r_af7284cc51a8ed5b551075584256de23c"><td class="memItemLeft" align="right" valign="top">UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af7284cc51a8ed5b551075584256de23c">BlockSize</a></td></tr>
<tr class="memdesc:af7284cc51a8ed5b551075584256de23c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of a single heap (memory block) to be allocated as part of this pool, in bytes. Optional.  <br /></td></tr>
<tr class="separator:af7284cc51a8ed5b551075584256de23c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f10db3911a3bea1becfc9a0dfa5bac8" id="r_a6f10db3911a3bea1becfc9a0dfa5bac8"><td class="memItemLeft" align="right" valign="top">UINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6f10db3911a3bea1becfc9a0dfa5bac8">MinBlockCount</a></td></tr>
<tr class="memdesc:a6f10db3911a3bea1becfc9a0dfa5bac8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty. Optional.  <br /></td></tr>
<tr class="separator:a6f10db3911a3bea1becfc9a0dfa5bac8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbce3a99f253928f9c3c09fa16015f9e" id="r_abbce3a99f253928f9c3c09fa16015f9e"><td class="memItemLeft" align="right" valign="top">UINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abbce3a99f253928f9c3c09fa16015f9e">MaxBlockCount</a></td></tr>
<tr class="memdesc:abbce3a99f253928f9c3c09fa16015f9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of heaps (memory blocks) that can be allocated in this pool. Optional.  <br /></td></tr>
<tr class="separator:abbce3a99f253928f9c3c09fa16015f9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a6283eeb1f3f99d8c4ae264aec7f749" id="r_a0a6283eeb1f3f99d8c4ae264aec7f749"><td class="memItemLeft" align="right" valign="top">UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0a6283eeb1f3f99d8c4ae264aec7f749">MinAllocationAlignment</a></td></tr>
<tr class="memdesc:a0a6283eeb1f3f99d8c4ae264aec7f749"><td class="mdescLeft">&#160;</td><td class="mdescRight">Additional minimum alignment to be used for all allocations created from this pool. Can be 0.  <br /></td></tr>
<tr class="separator:a0a6283eeb1f3f99d8c4ae264aec7f749"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a475840ec05c19732c8d5aa8bb27270f4" id="r_a475840ec05c19732c8d5aa8bb27270f4"><td class="memItemLeft" align="right" valign="top">ID3D12ProtectedResourceSession *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a475840ec05c19732c8d5aa8bb27270f4">pProtectedSession</a></td></tr>
<tr class="memdesc:a475840ec05c19732c8d5aa8bb27270f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Additional parameter allowing pool to create resources with passed protected session.  <br /></td></tr>
<tr class="separator:a475840ec05c19732c8d5aa8bb27270f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e6074af8c8ff7b957fe8d4b5036a5e6" id="r_a2e6074af8c8ff7b957fe8d4b5036a5e6"><td class="memItemLeft" align="right" valign="top">D3D12_RESIDENCY_PRIORITY&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2e6074af8c8ff7b957fe8d4b5036a5e6">ResidencyPriority</a></td></tr>
<tr class="memdesc:a2e6074af8c8ff7b957fe8d4b5036a5e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Residency priority to be set for all allocations made in this pool. Optional.  <br /></td></tr>
<tr class="separator:a2e6074af8c8ff7b957fe8d4b5036a5e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_pool.html" title="Custom memory pool.">D3D12MA::Pool</a> object. To be used with <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515" title="Creates custom pool.">D3D12MA::Allocator::CreatePool</a>. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="af7284cc51a8ed5b551075584256de23c" name="af7284cc51a8ed5b551075584256de23c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7284cc51a8ed5b551075584256de23c">&#9670;&#160;</a></span>BlockSize</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT64 D3D12MA::POOL_DESC::BlockSize</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Size of a single heap (memory block) to be allocated as part of this pool, in bytes. Optional. </p>
<p>Specify nonzero to set explicit, constant size of memory blocks used by this pool. Leave 0 to use default and let the library manage block sizes automatically. Then sizes of particular blocks may vary. </p>

</div>
</div>
<a id="ac4ed93b0191344d68c0b4ac1a4822ff4" name="ac4ed93b0191344d68c0b4ac1a4822ff4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4ed93b0191344d68c0b4ac1a4822ff4">&#9670;&#160;</a></span>Flags</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1">POOL_FLAGS</a> D3D12MA::POOL_DESC::Flags</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flags. </p>

</div>
</div>
<a id="a3795956e4fbfe7c3a23546e02e5d28dc" name="a3795956e4fbfe7c3a23546e02e5d28dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3795956e4fbfe7c3a23546e02e5d28dc">&#9670;&#160;</a></span>HeapFlags</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">D3D12_HEAP_FLAGS D3D12MA::POOL_DESC::HeapFlags</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Heap flags to be used when allocating heaps of this pool. </p>
<p>It should contain one of these values, depending on type of resources you are going to create in this heap: <code>D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS</code>, <code>D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES</code>, <code>D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES</code>. Except if ResourceHeapTier = 2, then it may be <code>D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES</code> = 0.</p>
<p>You can specify additional flags if needed. </p>

</div>
</div>
<a id="a06e06813bcb5206e9f7a8b0564bf1d6a" name="a06e06813bcb5206e9f7a8b0564bf1d6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06e06813bcb5206e9f7a8b0564bf1d6a">&#9670;&#160;</a></span>HeapProperties</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">D3D12_HEAP_PROPERTIES D3D12MA::POOL_DESC::HeapProperties</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The parameters of memory heap where allocations of this pool should be placed. </p>
<p>In the simplest case, just fill it with zeros and set <code>Type</code> to one of: <code>D3D12_HEAP_TYPE_DEFAULT</code>, <code>D3D12_HEAP_TYPE_UPLOAD</code>, <code>D3D12_HEAP_TYPE_READBACK</code>. Additional parameters can be used e.g. to utilize UMA. </p>

</div>
</div>
<a id="abbce3a99f253928f9c3c09fa16015f9e" name="abbce3a99f253928f9c3c09fa16015f9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbce3a99f253928f9c3c09fa16015f9e">&#9670;&#160;</a></span>MaxBlockCount</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT D3D12MA::POOL_DESC::MaxBlockCount</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Maximum number of heaps (memory blocks) that can be allocated in this pool. Optional. </p>
<p>Set to 0 to use default, which is <code>UINT64_MAX</code>, which means no limit.</p>
<p>Set to same value as <a class="el" href="#a6f10db3911a3bea1becfc9a0dfa5bac8" title="Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty....">D3D12MA::POOL_DESC::MinBlockCount</a> to have fixed amount of memory allocated throughout whole lifetime of this pool. </p>

</div>
</div>
<a id="a0a6283eeb1f3f99d8c4ae264aec7f749" name="a0a6283eeb1f3f99d8c4ae264aec7f749"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a6283eeb1f3f99d8c4ae264aec7f749">&#9670;&#160;</a></span>MinAllocationAlignment</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT64 D3D12MA::POOL_DESC::MinAllocationAlignment</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Additional minimum alignment to be used for all allocations created from this pool. Can be 0. </p>
<p>Leave 0 (default) not to impose any additional alignment. If not 0, it must be a power of two. </p>

</div>
</div>
<a id="a6f10db3911a3bea1becfc9a0dfa5bac8" name="a6f10db3911a3bea1becfc9a0dfa5bac8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f10db3911a3bea1becfc9a0dfa5bac8">&#9670;&#160;</a></span>MinBlockCount</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT D3D12MA::POOL_DESC::MinBlockCount</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty. Optional. </p>
<p>Set to 0 to have no preallocated blocks and allow the pool be completely empty. </p>

</div>
</div>
<a id="a475840ec05c19732c8d5aa8bb27270f4" name="a475840ec05c19732c8d5aa8bb27270f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a475840ec05c19732c8d5aa8bb27270f4">&#9670;&#160;</a></span>pProtectedSession</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ID3D12ProtectedResourceSession* D3D12MA::POOL_DESC::pProtectedSession</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Additional parameter allowing pool to create resources with passed protected session. </p>
<p>If not null then all the heaps and committed resources will be created with this parameter. Valid only if ID3D12Device4 interface is present in current Windows SDK! </p>

</div>
</div>
<a id="a2e6074af8c8ff7b957fe8d4b5036a5e6" name="a2e6074af8c8ff7b957fe8d4b5036a5e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e6074af8c8ff7b957fe8d4b5036a5e6">&#9670;&#160;</a></span>ResidencyPriority</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">D3D12_RESIDENCY_PRIORITY D3D12MA::POOL_DESC::ResidencyPriority</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Residency priority to be set for all allocations made in this pool. Optional. </p>
<p>Set this parameter to one of the possible enum values e.g. <code>D3D12_RESIDENCY_PRIORITY_HIGH</code> to apply specific residency priority to all allocations made in this pool: <code>ID3D12Heap</code> memory blocks used to sub-allocate for placed resources, as well as committed resources or heaps created when <a class="el" href="namespace_d3_d12_m_a.html#abbad31a7e0b3d09d77f3fb704b77645ea661a5472dba3dcecc5a2cc92afd25675">D3D12MA::ALLOCATION_FLAG_COMMITTED</a> is used. This can increase/decrease chance that the memory will be pushed out from VRAM to system RAM when the system runs out of memory, which is invisible to the developer using D3D12 API while it can degrade performance.</p>
<p>Priority is set using function <code>ID3D12Device1::SetResidencyPriority</code>. It is performed only when <code>ID3D12Device1</code> interface is defined and successfully obtained. Otherwise, this parameter is ignored.</p>
<p>This parameter is optional. If you set it to <code>D3D12_RESIDENCY_PRIORITY(0)</code>, residency priority will not be set for allocations made in this pool.</p>
<p>There is no equivalent parameter for allocations made in default pools. If you want to set residency priority for such allocation, you need to do it manually: allocate with <a class="el" href="namespace_d3_d12_m_a.html#abbad31a7e0b3d09d77f3fb704b77645ea661a5472dba3dcecc5a2cc92afd25675">D3D12MA::ALLOCATION_FLAG_COMMITTED</a> and call <code>ID3D12Device1::SetResidencyPriority</code>, passing <code>allocation-&gt;GetResource()</code>. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/include/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
</small></address>
</body>
</html>
